#ifndef __USER_UART_H
#define __USER_UART_H

#include "main.h"

#define DEBUG_BUFF_SIZE 255
#define RS232_BUFF_SIZE 255
#define ARGS_BUF_SIZE   255
typedef void (*cmd_handler_t)(char *args);


typedef struct {
    const char *name;           
    cmd_handler_t handler;
	const char id;
	const char *help;
} command_entry_t;


extern void Uart_Task();
static void parse_commands(uint8_t *buff, uint16_t len, void (*handle_cmd)(uint8_t *cmd, uint16_t cmd_len));
static void handle_command_by_id(uint8_t cmd_id, char *args);
static void handle_cmd(uint8_t *cmd, uint16_t cmd_len);
static void help_cmd();
static void copy_args(char *args_buf,const char *args);
static void print_parameter_list();
#endif